package com.tintuc24h.com;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

import com.tintuc24h.untils.Variables;

public class TinTuc24h extends Activity {

	private ImageView imageview;
	private int position;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		imageview=(ImageView) findViewById(R.id.tvmain);
		imageview.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(TinTuc24h.this, TheLoai.class);
				intent.putExtra(Variables.PAPER, position);
				startActivity(intent);
			}
		});
	}

	// PaperAdapter adapter = new PaperAdapter(TinTuc24h.this, R.id.tvtintuc,
	// Variables.PAPERS);
	// setListAdapter(adapter);
	//
	// }
	//
	// @Override
	// protected void onListItemClick(ListView l, View v, int position, long id)
	// {
	// super.onListItemClick(l, v, position, id);
	//
	// Intent intent=new Intent(TinTuc24h.this, Categories.class);
	// intent.putExtra(Variables.PAPER, position);
	// startActivity(intent);
	//
	// }

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.tin_tuc24h, menu);
		return true;
	}

}
